package com.aaa.statistics.controller.api;



import com.aaa.entity.HisCheckResult;
import com.aaa.entity.HisRegistration;
import com.aaa.statistics.service.IRegistrationService;
import com.aaa.statistics.vo.HisCheckResultVo;
import com.aaa.statistics.vo.HisRegistrationSaleVo;
import com.aaa.statistics.vo.HisRegistrationVo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author ：晋升（js20020923@qq.com）
 * @date ：Created in 2023/3/29 11:39
 * @description：医生工作量
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("statistics/api/registration")
public class ApiRegistrationController {
    @Autowired
    private IRegistrationService registrationService;

    /**
     * 查询所有医生的工作量量
     * @param
     * @return
     */
    @PostMapping("/list/{currentPage}/{pageSize}")
    public Result<IPage<HisRegistration>> list(
            @PathVariable Integer currentPage,
            @PathVariable Integer pageSize,
            @RequestBody HisRegistrationVo hisRegistrationVo
    ){
        System.out.println("================="+hisRegistrationVo);
        return registrationService.queryAll(currentPage,pageSize,hisRegistrationVo);
    }

    /**
     * 查询医生总体工作量
     * @param
     * @return
     */
    @PostMapping("/liststat")
    public Result<List<HisRegistrationSaleVo>> querySata(@RequestBody HisRegistrationVo hisRegistrationVo) {
        return registrationService.querySata(hisRegistrationVo);
    }
}

